import Vue from 'vue'
import Vuex from 'vuex'
import getters from './getters'
import app from './modules/app'
import im from './modules/im'
Vue.use(Vuex)

let storeConfig = {
  state: {
    glo_demo: 'global_Store',
    building: false,
    generalData: [],
    listData: [],
    buildNoNum: '',
    maxTower: '',
    abnormalObj: [],
    nextFlg: true
  },
  mutations: {
    setSearch(state, val) {
      state.search = val
    },
    buildingFlg(state, val){
      state.building = val
    },
    getListData(state,val){
      state.listData = val
    },
    getGeneralData(state,val){
      state.generalData = val
    },
    changebuildNo(state,val){
      state.buildNoNum = val
    },
    changeMaxTower(state,val){
      state.maxTower = val
    },
    abnormal(state,val){
      state.abnormalObj = val
    },
    nextFlgs(state,val){
      state.nextFlg = val
    }
  },
  modules: { app, im },
  getters,
}

export default new Vuex.Store(storeConfig)
